class Cat:
    __name = 'Tom'

    def print(self):
        print('私有方法')
        print(self.__name)


cat =Cat()
cat.print()
print(cat._Cat__name)